package chapter06.E14;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;

public class E14 {
    public static void main(String[] args) {
        HashMap map = new HashMap();
        map.put("23304010601","q");
        map.put("23304010601","c");
        map.put("23304010602","w");
        System.out.println(map);
        //取出key值队列 用来迭代
        Set ks  = map.keySet();
        Iterator it = ks.iterator();//抽出的key队列有迭代器
        while (it.hasNext()){
            Object obj = it.next();
            System.out.println("学号"+obj+":"+map.get(obj));
        }
    }
}
